package com.jstyle.beatecg.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.jstyle.beatecg.model.HrvData;
import com.jstyle.beatecg.model.PathRecord;
import com.jstyle.beatecg.model.StepData;
import com.jstyle.beatecg.model.UserInfo;

import com.jstyle.beatecg.dao.HrvDataDao;
import com.jstyle.beatecg.dao.PathRecordDao;
import com.jstyle.beatecg.dao.StepDataDao;
import com.jstyle.beatecg.dao.UserInfoDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig hrvDataDaoConfig;
    private final DaoConfig pathRecordDaoConfig;
    private final DaoConfig stepDataDaoConfig;
    private final DaoConfig userInfoDaoConfig;

    private final HrvDataDao hrvDataDao;
    private final PathRecordDao pathRecordDao;
    private final StepDataDao stepDataDao;
    private final UserInfoDao userInfoDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        hrvDataDaoConfig = daoConfigMap.get(HrvDataDao.class).clone();
        hrvDataDaoConfig.initIdentityScope(type);

        pathRecordDaoConfig = daoConfigMap.get(PathRecordDao.class).clone();
        pathRecordDaoConfig.initIdentityScope(type);

        stepDataDaoConfig = daoConfigMap.get(StepDataDao.class).clone();
        stepDataDaoConfig.initIdentityScope(type);

        userInfoDaoConfig = daoConfigMap.get(UserInfoDao.class).clone();
        userInfoDaoConfig.initIdentityScope(type);

        hrvDataDao = new HrvDataDao(hrvDataDaoConfig, this);
        pathRecordDao = new PathRecordDao(pathRecordDaoConfig, this);
        stepDataDao = new StepDataDao(stepDataDaoConfig, this);
        userInfoDao = new UserInfoDao(userInfoDaoConfig, this);

        registerDao(HrvData.class, hrvDataDao);
        registerDao(PathRecord.class, pathRecordDao);
        registerDao(StepData.class, stepDataDao);
        registerDao(UserInfo.class, userInfoDao);
    }
    
    public void clear() {
        hrvDataDaoConfig.clearIdentityScope();
        pathRecordDaoConfig.clearIdentityScope();
        stepDataDaoConfig.clearIdentityScope();
        userInfoDaoConfig.clearIdentityScope();
    }

    public HrvDataDao getHrvDataDao() {
        return hrvDataDao;
    }

    public PathRecordDao getPathRecordDao() {
        return pathRecordDao;
    }

    public StepDataDao getStepDataDao() {
        return stepDataDao;
    }

    public UserInfoDao getUserInfoDao() {
        return userInfoDao;
    }

}
